home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Ken Long / OvalsDoodadd-1.2-c / Data next >
Encoding:
Text File  |  1994-12-04  |  3.0 KB  |  69 lines  |  [TEXT/EDIT]

  1. "Oval Doodadd" is Public Domain (PD) 1993 Kenneth A. Long. No
  2. rights reserved.
  3.  
  4. There is nothing unique about this source.  It draws an oval in a
  5. rectangle, insets the rectangle, draws another, etc., until a
  6. parameter set by a control is reached.  There are two sets of
  7. ovals, one horizontal and one vertical (if that's possible).
  8.  
  9. Pretty basic and simple control/draw setup, but can be extended to
  10. control all sorts of things, such as numbers and frames in a
  11. SpriteWorld, etc.
  12.  
  13. Although this is B/W, it wouldn't take much to make it color.  A
  14. control could be set up to change colors.  Palette animation could
  15. be introduced, as well.
  16.  
  17. I have a fragment set in so you can change from oval to rect.  Try
  18. horizontal as an oval and vertical as a rect.
  19.  
  20. I needed to learn a little about controls and controlling.  When I
  21. got the "Display" file off the BMUG board, and got it to partially
  22. run, and saw the oval doodadd, I thought "I could rig in some
  23. controls and get these ovals to do more than they do now."  So the
  24. source that already had working controls like  the ones I needed
  25. was in EarthPlot 3.0. (a public domain source project). First, I made
  26. duplicates of any of its files and put them in the project folder.
  27.  
  28. Then I added any to my project I knew I needed and made my window
  29. routine call the first one on the tree.  So I got my oval window
  30. (with some error handling) with an EarthPlot control window over
  31. it.  Then it was only a matter of cutting out unnecessary stuff
  32. and changing point locations and names.  The only thing left was
  33. to put the control values into the drawing loops.  A button was
  34. put in to replace a menu item for drawing.
  35.  
  36. The SetUpMenu routine in the original, was funky so I modified it
  37. to be like the one in MiniEdit.  This change made a couple other
  38. things not work so I fixed them.
  39.  
  40. I actually had the program working 99% like I wanted it, but there
  41. was one thing left.  When I moved the control "thumb" the value
  42. Rect didn't update until the was up or down arrow was clicked. 
  43. The value updated, but the display of it did not.  When I went to
  44. fix that, the whole control mechanism no longer worked, and I
  45. could not remember exactly how to get it to work again!
  46.  
  47. The "diamond in the turd" (a valuable lesson which is learned from
  48. this frustrating experience) is:  If you have source that works
  49. and are going to make changes in it, even if you made the source,
  50. MAKE A COPY OF IT FIRST!  It took me several  hours to get the
  51. program to work the SAME WAY that only took me 20 minutes to  do
  52. the first time.  Call them "1.c, 2.c 3.c" and so on.  Making copies
  53. is nothing compared to retracing actions from human memory!  Then
  54. if it gets botched, you can say, "Well, I messed THAT up!  Let's
  55. see.  2-Oval.c ran.  I'll just go back to it and start over." 
  56. Dig?
  57.  
  58. But, in getting it back to a running project, I had to hit the
  59. books, and I did learn more than if I had just went with the first
  60. one.  So maybe it wasn't such a "turd" after all.
  61.  
  62. The original file is included, here.
  63.  
  64. Have fun!  I did!
  65.  
  66. -Ken-    
  67.  
  68. (kenlong@netcom.com)
  69.